#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;

int main()
{
    string str;
    getline(cin, str);
    string a, b;
    for (int i = 0; i < str.size(); i++)
    {
        if (i % 2)
            a += str[i];
        else
            b += str[i];
    }
    cout << b << endl;
    cout << a << endl;
    cout << b + a;
}